package com.szholly.pro.watergas_server.ps.data;

import java.util.HashMap;

import com.szholly.data.general.metadata.table.DefulatDomainTable;import org.springframework.stereotype.Component;import com.szholly.data.general.Field;import com.szholly.data.general.InterceptorTableBase;import com.szholly.data.general.metadata.IBaseTable;import com.szholly.utils.spring.SpringBeanFactory;import org.springframework.stereotype.Component;import com.szholly.data.general.GlobalDataType;import com.szholly.data.general.RowBase;
/**
 * OperationEffectiveness
 */
@Component("OperationEffectiveness")
public class OperationEffectivenessTable extends InterceptorTableBase  implements IBaseTable{

	public final static String TABLE_NAME = "OP_EFFE";
	
	/**
	 * single ref
	 */
	public static OperationEffectivenessTable getSingleRef() {
		return (OperationEffectivenessTable) SpringBeanFactory.getBean("OperationEffectiveness");
	}

	@Override
	public String getMetadataTableName() {
		return TABLE_NAME;
	}

	@Override
	public String getMetadataTableAliasName() {
		return "OperationEffectiveness";
	}

	private HashMap<String, Field> fields;

	@Override
	protected HashMap<String, Field> fields() {
		if (fields == null) {
			fields = new HashMap<String, Field>();

			Field itemField = null;
			
			itemField = new Field();
			itemField.setFieldName(OperationEffectivenessRow.FIELD_Ct);
			itemField.setDataType(GlobalDataType.DateTime);
			itemField.setFieldID(5);
			itemField.setFieldAliasName("日期");
			itemField.setAllowNull(true);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationEffectivenessRow.FIELD_IsValid);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(6);
			itemField.setFieldAliasName("是否有效，0为无效，1为有效");
			itemField.setAllowNull(true);
			itemField.setMaxLen(10);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationEffectivenessRow.FIELD_TaskType);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(7);
			itemField.setFieldAliasName("任务类型,1为日常巡检,2为定期维护，3为超标比对，4为设备故障维修，5为备件及耗材更换，6为水样比对，7为标样核查，8为日常校准");
			itemField.setAllowNull(true);
			itemField.setMaxLen(50);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationEffectivenessRow.FIELD_Guid);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(8);
			itemField.setFieldAliasName("GUID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationEffectivenessRow.FIELD_TaskCode);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(9);
			itemField.setFieldAliasName("任务ID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationEffectivenessRow.FIELD_DataType);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(10);
			itemField.setFieldAliasName("运营类型，0-污染源  1-地表水 2-工业污染源 3-供水");
			itemField.setAllowNull(true);
			itemField.setMaxLen(10);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
		}
		return fields;
	}

	@Override
	public String getTableGroup() {
		return "OperationEffectiveness";
	}
}